<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:key name="searchid" match="item" use="@id" />
	<xsl:template match="/">
		<xsl:call-template name="print-path">
			<xsl:with-param name="sid" select="'3'" />
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="print-path">
		<xsl:param name="sid" select="'0'" />
		<xsl:for-each
			select="key('searchid',$sid)/ancestor-or-self::*">
			<xsl:value-of select="@id" />
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>